/**
 * 存放用户模块的请求
 */

import axios from "axios";
import { instance } from "../utils/request";

//注册请求
export const postRegisterReq = function (data) {
	return instance({
		method: "post",
		url: "/api/user/register",
		data,
	});
};


//登录请求
export const postLoginReq = function (data) {
	return instance({
		method: "post",
		url: "/api/user/login",
		data,
	});
};


//获取用户信息
export const getUserInfoReq = () =>{
	return  instance({
		method:"get",
		url:"/api/user/info",
		
	})
}

// 打卡
export const postUserClockInReq = ()=> {
	return instance({
		method: "post",
		url: "/api/user/clockIn",
		
	});
};



// 头像上传
export const postUploadPortraitReq = data=> {
	return instance({
		method: "post",
		url: "/api/shared/uploadPortrait",
		data,
		
	});
};


//保存用户信息
export const postUserChangeInfoReq = data=> {
	return instance({
		method: "post",
		url: "/api/user/changeInfo",
		data,
		
	});
};



